package interview.algorithms.offer.singleton;
// 线程安全 DCL
public class Three {
    private static Three obj;

    private Three() {
    }

    synchronized public static Three getObj() {
            if (obj == null) {
                synchronized (Three.class) {
                    if (obj == null) {
                        obj = new Three();
                    }
                }
            }
        return obj;
    }
}
